<template>
  <div v-if="Show" style="margin-top: 5px;display:flex;align-items: start;">
    <i
      class="el-icon-info"
      style="color:#f97316;margin-right:7px;font-size:18px;"
    />
    <span style="color:rgb(0, 153, 255);font-size:13px;line-height: 20px;">
      <template v-if="value">{{ value }}</template>
      <slot v-else />
    </span>
  </div>
</template>

<script>
export default {
  name: 'FormItemTip',
  inject: {
    elForm: {
      default: {}
    }
  },
  props: {
    value: '',
    hideWhenDisabled: {
      default: true,
      type: Boolean
    }
  },
  computed: {
    Show () {
      return !(this.hideWhenDisabled && Boolean(this.elForm.disabled))
    }
  }
}
</script>

<style lang="scss" scoped></style>
